using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableItemShopPriceDao:DaoBase<TableItemShopPrice>
    {
        public override void AddPrimaryIndex(TableItemShopPrice model)
        {
            cachePrimary[model.id.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableItemShopPrice.txt";
        }

        protected override TableItemShopPrice ParseRowData(string[] rowData)
        {
            TableItemShopPrice data = new TableItemShopPrice();
			data.id = rowData [0];
			data.shopItemId = rowData [1];
			data.count = rowData [2];
			data.price = rowData [3];

            return data;
        }


        public override void AddOneIndex(TableItemShopPrice model)
        {
            if (!cacheOneIndex.ContainsKey(model.shopItemId.ToString()))
            {
                cacheOneIndex[model.shopItemId.ToString()] = new List<TableItemShopPrice>();
            }
            cacheOneIndex[model.shopItemId.ToString()].Add(model);
        }
    

    }

}
